<%@ page language="java" import="java.util.*,com.imaker.domain.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
List<Navigation> navList = (List<Navigation>)request.getAttribute("navList");
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" href="<%=path%>/css/plugin/zTree/zTreeStyle.css" type="text/css">
	<link href="<%=path %>/css/system/core.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="<%=path%>/js/jquery.js"></script>
	<script type="text/javascript">
	
	//创建
	function toNew(){
	document.getElementById("listFrame").src = "<%=path %>/system/fastoperat/toSave.action";
	}
	//更新
	function toupdate(){
	var array = $(window.frames["listFrame"].document).find("input[name='idList'][@checked]");
	var id;
	if(array!=null&&array.size()>0){
		id = array[0].value;
	  }else {
	  	alert("请选择一条数据");
	  	return;
	  }
	  document.getElementById("listFrame").src = "<%=path %>/system/fastoperat/toUpdate.action?fastOperatInfo.id="+id;
	}

	//删除
	function toDelete(){
		var array = $(window.frames["listFrame"].document).find("input[name='idList'][@checked]");
		if(array==null||array.size()==0){
			alert("请选择一条记录");
			return;
		}
		if(!confirm("确认删除？")){
			return;
		}
		window.listFrame.form.action = "<%=path %>/system/fastoperat/delete.action";
		window.listFrame.form.submit();
	}
	
	$(document).ready(function(){
		 document.getElementById("listFrame").src="<%=path %>/system/fastoperat/listByPage.action";
	});
	</script>
  </head>
  <body>
  <div class="rightTable">
  		<div class="title"></div>
  		<div class="line"></div>
  		<div class="menuBar">
  			<dl>
					<dt class="new"></dd>
					<dd><a href="javascript:void(0);" onclick="toNew()">新建</dd>
					<dt class="edit"></dd>
					<dd><a href="javascript:void(0);" onclick="toupdate()">修改</a></dd>
					<dt class="delete"></dd>
					<dd><a href="javascript:void(0);" onclick="toDelete()">删除</a></dd>
			</dl>
		</div>
		<div class="clearR"></div>
  		<div class="listFrame">
  			<iframe id="listFrame" name="listFrame" scrolling="no" frameborder="0"></iframe>
  		</div>
  </div>
  </body>
</html>
